package com.yjt.fresh.adpater;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yjt.fresh.R;
import com.yjt.fresh.bean.BeanGoodsCategories;
import com.yjt.fresh.bean.BeanHomePage;

import java.util.List;

/**
 * 商品分类的二级分类
 * Created by mcc on 2018/6/16.
 */

public class AdpRvProductsCategoryContent extends BaseQuickAdapter<BeanGoodsCategories.SecondtypeListBean, BaseViewHolder> {
    public AdpRvProductsCategoryContent(int layoutResId, @Nullable List<BeanGoodsCategories.SecondtypeListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BeanGoodsCategories.SecondtypeListBean item) {
        ImageView imageView = helper.getView(R.id.ivAppItemCategoriesContent);
        TextView textView = helper.getView(R.id.tvAppItemCategoriesContent);
        Glide.with(mContext).load(item.getCOVER_IMG()).into(imageView);
        textView.setText(item.getTITLE());
    }
}
